package com.aeoj.client.problem.service.impl;

import com.aeoj.client.problem.mapper.ProblemMapper;
import com.aeoj.client.problem.service.ProblemService;
import com.aeoj.domain.client.problem.vo.ProblemVO;
import com.aeoj.domain.management.Problem;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: ZSM
 * time: 2025-04-14 22:35
 */
@Service
public class ProblemServiceImpl extends ServiceImpl<ProblemMapper, Problem>
        implements ProblemService{

    @Resource
    private ProblemMapper problemMapper;

    @Override
    public IPage<Problem> listProblemVO(ProblemVO problem, Integer pageNumber, Integer pageSize) {
        Page<Problem> page = new Page<>(pageNumber, pageSize);
        QueryWrapper<Problem> queryWrapper = new QueryWrapper<>();
        return problemMapper.selectPage(page, queryWrapper);
    }
}
